#ifndef RTSPSTREAMTHREAD_H
#define RTSPSTREAMTHREAD_H

#include <iostream>
#include <string>
#include <cstdlib>
#include <string.h>

#include "RTSPStreamClient.h"

using namespace std;

class RTSPStreamThread;

struct ThreadArgStruct
{
	RTSPStreamThread* threadClass;
	string progName;
	string urlToPlay;
	string confFile;
};

class RTSPStreamThread
{
public:
	RTSPStreamThread(string pgName, string url, string conf);
	~RTSPStreamThread();

	int configureThread();
	int launchThread();
	int joinThread();

	RTSPStreamClient* rtspClient;

private:
	pthread_t threadID;
	pthread_attr_t threadAttr;
	struct sched_param threadSchedParam;

	struct ThreadArgStruct tas;
};

void* RTSPStreamClientCore(void* ptr);


#endif
